<template>
  <div class="leveloneform">
    <el-form :inline="true" :model="formData"  size="mini" disabled=""  label-width="80px">
      <el-form-item :label="item.label" v-for="item in headerFormOptions">
        <el-select v-if="item.type=='select'"  v-model="formData[item.prop]">
          <el-option v-for="it in item.dict" :value="it.value" :label="it.label"></el-option>
        </el-select>
        <el-input v-else v-model="formData[item.prop]"></el-input>
      </el-form-item>
    </el-form>
    <el-button class="back" size="small"  type="primary" @click="back">返回</el-button>
  </div>
</template>

<script>
export default {
  name: "headerForm",
  props:{
    headerFormOptions:{
      type:Array
    },
    formData:{
      type:Object
    }
  },
  data() {
    return {
      formData: {

      }
    }
  },
  methods:{
    back(){
      this.$emit('close') ;
    }
  }
}
</script>

<style scoped>
.leveloneform{padding-right: 120px;position: relative}
.leveloneform .back{position: absolute;top: 0;right:10px;}
</style>